<section class="content-header">
  <!-- <h1>
        审计业务
    </h1> -->
  <ol class="breadcrumb">
    <li><a ui-sref="dashboard"><i class="fa fa-dashboard"></i>我的面板</a></li>
    <li><a ui-sref="abroad">审计业务</a></li>
    <li class="active" ng-bind="current_bread"></li>
  </ol>
</section>
<section class="content">
  <form class="form-horizontal" id="audit_form">
    <div class="detail-view-header-wrapper">
      <div class="box-footer detail-view-header" ui-scrollpoint ui-scrollpoint-enabled="true" ui-scrollpoint-class="fixed">
        <button type="button" class="btn btn-default" ng-click="cancel()">取消</button>
        <button type="button" class="btn btn-info" ng-click="save()">保存</button>
      </div>
    </div>
    <div class="box box-danger" ng-if="current_name != 'audit_add_s' && action=='add'">
      <div class="box-header with-border">
        <h3 class="box-title">旧数据迁移</h3>
        <div class="box-tools">
          <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
          </div>
        </div>
      </div>
      <div class="box-body">
        <div class="form-group">
          <label class="col-sm-2 control-label">是否为旧订单<span class="required">*</span></label>
          <div class="col-sm-6">
            <select class="form-control select2" name="is_old" ng-model="data.is_old" data-rule="required;">
              <option value="">请选择</option>
              <option value="1">旧数据迁移</option>
              <option value="0">新订单</option>
            </select>
          </div>
        </div>
        <div ng-if="data.is_old == 1">
          <div class="form-group">
            <label class="col-sm-2 control-label">订单完成日期<span class="required">*</span></label>
            <div class="col-sm-6">
              <input type="text" class="form-control date-input" id="date_finish" name="date_finish" ng-model="data.date_finish" data-rule="required;">
            </div>
          </div>
        </div>
        <!-- <div class="form-group" ng-if="data.is_old == 1">
                    <label class="col-sm-2 control-label">本年度是否已年检</label>
                    <div class="col-sm-6">
                        <select class="form-control select2" name="is_already_annual" ng-model="data.is_already_annual" data-rule="required;">
                            <option value="">请选择</option>
                            <option value="1">已年检</option>
                            <option value="0">未年检</option>
                        </select>
                    </div>
                </div> -->
        <div class="form-group">
          <label class="col-sm-2 control-label">字段说明</label>
          <div class="col-sm-6">
            <p style="line-height: 34px;">
              <span style="color: #217f50; font-weight: bold;">是否为旧订单:</span> 旧的订单数据迁移到该系统时，请选择“旧数据迁移”，旧数据迁移不走审核数据。录入完成后即属于完成的订单
            </p>
          </div>
        </div>
      </div>
    </div>
    <div class="box box-danger">
      <div class="box-header with-border">
        <h3 class="box-title">客户基本信息</h3>
        <div class="box-tools">
          <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
          </div>
        </div>
      </div>
      <div class="box-body">
        <div class="form-group">
          <label class="col-sm-2 control-label">客户名称<span class="required">*</span></label>
          <div class="col-sm-6">
            <select ui-select2 class="form-control select2" id="customerSelect2" name="customer_id" ng-view="customer_name" ng-model="data.customer_id" data-formatfields="code,text" data-formatcaptions="编号,名称" data-rule="required;" url="Customer/SearchForDropdown" paging="true" style="width: 100%;"></select>
            <span id="customerSelect2-validator" class="select-validator"></span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">所属省</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.province" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">所属市</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.city" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">所属县</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.county" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">地址</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.customer_address" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">联系人</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.contact" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">手机</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.mobile" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">座机</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.tel" disabled>
          </div>
        </div>
      </div>
    </div>
    <div class="box box-danger">
      <div class="box-header with-border" style="margin-bottom: 10px;">
        <h3 class="box-title">审计信息</h3>
        <div class="box-tools">
          <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
          </div>
        </div>
      </div>
      <div class="box-body">
        <div class="form-group" ng-if="data.is_old != 1">
          <label class="col-sm-2 control-label">档案号<span class="required">*</span></label>
          <div class="col-sm-6">
            <input type="text" class="form-control" placeholder="系统自动生成" ng-model="data.code" readonly>
          </div>
        </div>
        <div class="form-group" ng-if="data.is_old == 1">
          <label class="col-sm-2 control-label">档案号<span class="required">*</span></label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.code" name="code" data-rule="required; code" placeholder="区域代码+订单代码+流水号">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">订单类别<span class="required">*</span></label>
          <div class="col-sm-6">
            <select class="form-control select2" name="type" id="selectType" ng-model="data.type" data-rule="required;" ng-disabled="current_name == 'audit_add_s'">
              <option value="">请选择</option>
              <option value="境内">境内审计</option>
              <option value="境外">境外审计</option>
            </select>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">来源单据</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.source_code" disabled placeholder="若无可不选">
          </div>
          <div class="col-sm-1 add-dictionary" ng-if="current_name != 'audit_add_s'">
            <a class="fa fa-search" ng-click="selectSource()"></a>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">公司中文名称</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" name="name_cn" ng-model="data.name_cn" data-rule="length[~100];">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">公司英文名称<span class="required">*</span></label>
          <div class="col-sm-6">
            <input type="text" class="form-control" name="name_en" ng-model="data.name_en" data-rule="required; length[~100];">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">公司成立日期</label>
          <div class="col-sm-6">
            <input type="text" class="form-control date-input" id="date_setup" name="date_setup" ng-model="data.date_setup" data-rule="">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">公司注册地址</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" name="address" ng-model="data.address" data-rule="length[~300];">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">业务性质</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.business_nature" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">行业类别</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.industry" disabled>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">业务范围</label>
          <div class="col-sm-6">
            <select ui-select2 class="form-control select2" name="business_area" ng-model="data.business_area" url=" Dictionary/DroplistByGroup" paging="false" paramfield="group" paramvalue="业务范围" data-rule=""></select>
          </div>
          <div class="col-sm-2 add-dictionary">
            <a class="fa fa-plus" ui-sref=".dictionary({group: '业务范围'})" ui-sref-opts="{location:false}" title="新增业务范围"></a>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">贸易方式</label>
          <div class="col-sm-6">
            <select ui-select2 class="form-control select2" name="trade_mode" ng-model="data.trade_mode" url=" Dictionary/DroplistByGroup" paging="false" paramfield="group" paramvalue="贸易方式" data-rule=""></select>
          </div>
          <div class="col-sm-2 add-dictionary">
            <a class="fa fa-plus" ui-sref=".dictionary({group: '贸易方式'})" ui-sref-opts="{location:false}" title="新增贸易方式"></a>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">有无子母公司</label>
          <div class="col-sm-6">
            <input type="checkbox" name="has_parent" ng-true-value="1" ng-false-value="0" ng-model="data.has_parent">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">做账次数</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" name="account_number" ng-model="data.account_number" data-rule="digits;">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">账期</label>
          <div class="col-sm-3">
            <input type="text" class="form-control date-input" id="account_period" name="account_period" ng-model="data.account_period">
          </div>
          <div class="col-sm-3">
            <input type="text" class="form-control date-input" id="account_period2" name="account_period2" ng-model="data.account_period2">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">年结日</label>
          <div class="col-sm-3">
            <select class="form-control select2" name="date_year_end1" ng-model="data.date_month_end">
              <option value="">选择月份</option>
              <option value="1">1月</option>
              <option value="2">2月</option>
              <option value="3">3月</option>
              <option value="4">4月</option>
              <option value="5">5月</option>
              <option value="6">6月</option>
              <option value="7">7月</option>
              <option value="8">8月</option>
              <option value="9">9月</option>
              <option value="10">10月</option>
              <option value="11">11月</option>
              <option value="12">12月</option>
            </select>
          </div>
          <div class="col-sm-3">
            <select class="form-control select2"  name="date_year_end2" ng-model="data.date_day_end">
              <option value="">选择日期</option>
              <option value="1">1日</option>
              <option value="2">2日</option>
              <option value="3">3日</option>
              <option value="4">4日</option>
              <option value="5">5日</option>
              <option value="6">6日</option>
              <option value="7">7日</option>
              <option value="8">8日</option>
              <option value="9">9日</option>
              <option value="10">10日</option>
              <option value="11">11日</option>
              <option value="12">12日</option>
              <option value="13">13日</option>
              <option value="14">14日</option>
              <option value="15">15日</option>
              <option value="16">16日</option>
              <option value="17">17日</option>
              <option value="18">18日</option>
              <option value="19">19日</option>
              <option value="20">20日</option>
              <option value="21">21日</option>
              <option value="22">22日</option>
              <option value="23">23日</option>
              <option value="24">24日</option>
              <option value="25">25日</option>
              <option value="26">26日</option>
              <option value="27">27日</option>
              <option value="28">28日</option>
              <option value="29">29日</option>
              <option value="30">30日</option>
              <option value="31">31日</option>
            </select>
            <!-- <input type="text" class="form-control date-input" id="date_year_end" name="date_year_end" ng-model="data.date_year_end"> -->
          </div>
        </div>
        <!-- <div class="form-group">
          <label class="col-sm-2 control-label">营业额</label>
          <div class="col-sm-4">
            <input type="text" class="form-control" name="turnover" ng-model="data.turnover" data-rule-money="[/^(([1-9]\d{0,9})|0)(\.\d{1,2})?$/, '请填写2位数的数值']" data-rule="money;">
          </div>
          <div class="col-sm-2">
            <select ui-select2 class="form-control select2" id="currencySelect3" name="turnover_currency" ng-model="data.turnover_currency" url="Dictionary/DroplistByGroup" paging="false" paramfield="group" paramvalue="币别"></select>
          </div>
        </div> -->
        <div class="form-group">
          <label class="col-sm-2 control-label">银行入账金额</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" name="amount_bank" ng-model="data.amount_bank" data-rule-money="[/^(([1-9]\d{0,9})|0)(\.\d{1,2})?$/, '请填写2位数的数值']" data-rule="money;">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">单据量</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" name="bill_number" ng-model="data.bill_number" data-rule="digits;">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">会计准则</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" name="accounting_standard" ng-model="data.accounting_standard" data-rule="length[~50];">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">做账费用</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" name="cost_accounting" ng-model="data.cost_accounting" data-rule-money="[/^(([1-9]\d{0,9})|0)(\.\d{1,2})?$/, '请填写2位数的数值']" data-rule="money;">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">成交日期</label>
          <div class="col-sm-6">
            <input type="text" class="form-control date-input" id="date_transaction" name="date_transaction" ng-model="data.date_transaction" data-rule="">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">成交金额</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" name="amount_transaction" ng-model="data.amount_transaction" data-rule-money="[/^(([1-9]\d{0,9})|0)(\.\d{1,2})?$/, '请填写2位数的数值']" data-rule="money;">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">交易币别</label>
          <div class="col-sm-6">
            <select ui-select2 class="form-control select2" id="currencySelect2" name="currency" ng-model="data.currency" url="Dictionary/DroplistByGroup" paging="false" paramfield="group" paramvalue="币别" data-rule=""></select>
            <span id="currencySelect2-validator" class="select-validator"></span>
          </div>
          <div class="col-sm-2 add-dictionary">
            <a class="fa fa-plus" ui-sref=".dictionary({group: '币别'})" ui-sref-opts="{location:false}" title="新增币别"></a>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">汇率</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" name="rate" ng-model="data.rate" data-rule-money="[/^(([1-9]\d{0,9})|0)(\.\d{1,2})?$/, '请填写2位数的数值']" data-rule="money;">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 control-label">其他事项</label>
          <div class="col-sm-8">
            <textarea class="form-control" rows="3" name="description" ng-model="data.description" data-rule="length[~100];"></textarea>
          </div>
        </div>
      </div>
    </div>
    <div class="box box-danger">
      <div class="box-header with-border">
        <h3 class="box-title">其他信息</h3>
        <div class="box-tools">
          <div class="box-tools pull-right">
            <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
            </button>
          </div>
        </div>
      </div>
      <div class="box-body">
        <div class="form-group">
          <label class="col-sm-2 control-label">客户归属</label>
          <div class="col-sm-6">
            <input type="text" class="form-control" ng-model="data.salesman" disabled>
            <!-- <select ui-select2 class="form-control select2" id="salesmanSelect2" name="salesman_id" ng-view="salesman" ng-model="data.salesman_id" data-rule="required;" url=" Member/List" paging="true" style="width: 100%;"></select> -->
          </div>
        </div>

        <div class="form-group">
            <label class="col-sm-2 control-label">订单归属</label>
            <div class="col-sm-6">
              <input type="text" class="form-control" ng-model="data.creator" disabled>

              <!-- <select ui-select2 class="form-control select2" id="assistantSelect2" name="assistant_id" ng-view="assistant_name" ng-model="data.assistant_id" url="Member/List" paging="true" style="width: 100%;"></select> -->
            </div>
        </div>

        <div class="form-group">
          <label class="col-sm-2 control-label">渠道商</label>
          <div class="col-sm-6">
            <select
              ui-select2
              class="form-control select2"
              id="traderSelect2"
              name="trader_id"
              ng-view="trader_name"
              ng-model="data.trader_id"
              data-formatfields="code,text"
              data-formatcaptions="编号,名称"
              url="Customer/SearchForDropdown"
              paging="true"
              style="width: 100%;"
              readonly
            ></select>
            <span id="traderSelect2-validator" class="select-validator"></span>
          </div>
        </div>

        <div class="form-group">
          <label class="col-sm-2 control-label">助理</label>
          <div class="col-sm-6">
            <select ui-select2 class="form-control select2" id="assistantSelect2" name="assistant_id" allowclear="true"  ng-view="assistant_name" ng-model="data.assistant_id" url=" Member/List" paging="true" style="width: 100%;"></select>
          </div>
        </div>
        <!-- <div class="form-group">
          <label class="col-sm-2 control-label">会计</label>
          <div class="col-sm-6">
            <select ui-select2 class="form-control select2" id="accountantSelect2" name="accountant_id" allowclear="true"  ng-view="accountant_name" ng-model="data.accountant_id" data-rule="" url=" Member/List" paging="true" style="width: 100%;"></select>
            <span id="accountantSelect2-validator" class="select-validator"></span>
          </div>
        </div> -->
        <div class="form-group">
          <label class="col-sm-2 control-label">经理</label>
          <div class="col-sm-6">
            <select ui-select2 class="form-control select2" id="waiterSelect2" name="manager_id" allowclear="true"  ng-view="manager_name" ng-model="data.manager_id" url=" Member/List" paging="true" style="width: 100%;"></select>
          </div>
        </div>
      </div>
    </div>
  </form>
</section>
<div ui-view="modal"></div>
<div ui-view="source"></div>
